package com.mjlf.mqzook.inter;

import com.alibaba.fastjson.JSONObject;
import com.mjlf.mqzook.entity.ZkTopic;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @ClassName TopicFactroy
 * @Author mjlft
 * @Date 2020/2/18 16:22
 * @Version 1.0
 * @Description TODO
 */
public interface TopicFactroy {
    final Map<String, ZkTopic> TOPICS = new ConcurrentHashMap<>();
    JSONObject createTopic(@RequestBody ZkTopic topic);
    JSONObject deleteTopic(String name);
}
